{include file="header.html"}
<script type="text/javascript">
$(function(){
    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
});
</script>
<div id="rightTop">
    <p>{$lang.order_manage}</p>
    <ul class="subnav">
        <li><span>{$lang.manage}</span></li>
    </ul>
</div>
<div class="mrightTop">
    <div class="fontl">
        <form method="get">
             <div class="left">
                <input type="hidden" name="app" value="courseorder" />
                <input type="hidden" name="act" value="index" />
                <select class="querySelect" name="field">{html_options options=$search_options selected=$smarty.get.field}
                </select><input class="queryInput" type="text" name="search_name" value="{$query.search_name|escape}" />
                {$lang.add_time_from} <input class="queryInput2" style="width:65px;" type="text" value="{$query.add_time_from}" id="add_time_from" name="add_time_from" class="pick_date" />
                {$lang.add_time_to} <input class="queryInput2" style="width:65px;" type="text" value="{$query.add_time_to}" id="add_time_to" name="add_time_to" class="pick_date" />
                {$lang.order_amount_from} <input class="queryInput2" style="width:65px;" type="text" value="{$query.order_amount_from}" name="order_amount_from" />
                {$lang.order_amount_to} <input class="queryInput2" style="width:65px;" type="text" style="width:60px;" value="{$query.order_amount_to}" name="order_amount_to" class="pick_date" />
                <input type="submit" class="formbtn" value="{$lang.query}" />
            </div>
            <!--{if $filtered}-->
            <a class="left formbtn1" href="index.php?app=courseorder">{$lang.cancel_query}</a>
            <!--{/if}-->
        </form>
    </div>
    <div class="fontr">
        {if $courseorders}{include file=page.top.html}{/if}
    </div>
    <div class="clear:both;"></div>
</div>
<div class="tdare">
    <table width="100%" cellspacing="0" class="dataTable">
        <!--{if $courseorders}-->
        <tr class="tatr1">
            <td width="10%" class="firstCell">{$lang.order_sn}</td>
            <td width="15%">{$lang.course_name}</td>
            <td width="15%">{$lang.user_name} | {$lang.real_name}</td>
            <td width="5%" style="text-align: center;">{$lang.status}</td>
            <td width="10%" style="text-align: center;">{$lang.add_time}</td>
            <td style="text-align: center;">{$lang.pay_type}</td>
            <td width="5%" style="text-align: center;">{$lang.order_amount}</td>
            <td width="10%" style="text-align: center;">{$lang.consignee}</td>
            <td width="10%">{$lang.phone}</td>
            <td width="10%">{$lang.validity}</td>
            <td>{$lang.handler}</td>
        </tr>
        <!--{/if}-->
        <!--{foreach from=$courseorders item=courseorder}-->
        <tr class="tatr2">
            <td class="firstCell">{$courseorder.order_sn|escape}</td>
            <td>{$courseorder.name}</td>
            <td>{$courseorder.user_name|escape} | {$courseorder.real_name|escape}</td>
            <td style="text-align: center;">{$courseorder.status|escape}</td>
            <td style="text-align: center;">{$courseorder.add_time|date:complete}</td>
            <td style="text-align: center;">{$courseorder.pay_type|escape|default:-}</td>
            <td style="text-align: right;">{$courseorder.order_amount|price|default:-}</td>
            <td style="text-align: center;">{$courseorder.consignee|escape}</td>
            <td>{$courseorder.phone|escape|default:-}</td>
            <td>{if $courseorder.validity eq 0}无限制{else}{$courseorder.validity|date:Y-m-d}{/if}</td>
            <td><a href="index.php?app=courseorder&amp;act=view&amp;id={$courseorder.order_id}">{$lang.view}</a></td>
        </tr>
        <!--{foreachelse}-->
        <tr class="no_data">
            <td colspan="7">{$lang.no_data}</td>
        </tr>
        <!--{/foreach}-->
    </table>
    <div id="dataFuncs">
        <div class="pageLinks">
            {if $courseorders}{include file=page.bottom.html}{/if}
        </div>
        <div class="clear:both;"></div>
    </div>
    <div class="clear"></div>
</div>
{include file="footer.html"}
